{% extends "djips/common/base.html" %}
{% load i18n %}

{% block title %}
{% trans "Delete category" %}
{% endblock %}


{% block content %}
<form name="form_color_delete"
      method="POST"
      action="{{admin_base_url}}/djips_common/colors/delete/{{color.id}}/">

<p class="confirm">
{% blocktrans with color.name as color_name%}Do you really want to delete category '{{color_name}}'?{% endblocktrans %}<br />
{% if related_objects %}
{% trans "This category is used by those objects:" %}</p>
<ul>
  {% for class_name, items in related_objects.items %}
  <li>{{class_name}}:
    <ul>
      {% for item in items %}
      <li>{{item}}</li>
      {% endfor %}
    </ul>
  </li>
  {% endfor %}
</ul>
{% else %}
</p>
{% endif %}
  <div class="center">
   <input type="submit"
          class="valid"
          name="confirm"
          value="{% trans "Delete color" %}"/>
   <input type="submit"
          class="cancel"
          name="cancel"
          value="{% trans "Cancel" %}"/>
  </div>
</form>
{% endblock %}
